<template>
    <div class="container">
        <div class="con">
            <yd-preview v-for="(item, index) in items" :buttons="btns">
                <yd-preview-header>
                    <div slot="left">公司名称</div>
                    <div slot="right">{{item.unitName}}</div>
                </yd-preview-header>

                <yd-preview-item>
                    <div slot="left">简称</div>
                    <div slot="right">{{item.unitShortName}}</div>
                </yd-preview-item>
                <yd-preview-item>
                    <div slot="left">关键字</div>
                    <div slot="right">{{item.unitKey}}</div>
                </yd-preview-item>
                <yd-preview-item>
                    <div slot="left">企业编号</div>
                    <div slot="right">{{item.unitCode}}</div>
                </yd-preview-item>
                <yd-preview-item>
                    <div slot="left">有效期</div>
                    <div slot="right">{{item.deadLine}}</div>
                </yd-preview-item>
            </yd-preview>
        </div>
    </div>
</template>
<script>
    import AjaxHttp from '../../js/ajaxHttp.js';
    export default{
        data: function () {
            return {
                items: '',
                btns: []
            }
        },
        created: function () {
            const _this = this;
            AjaxHttp.getHttp('fxsys/unitBCManage/index').then(function (response) {
                console.log(response);
                _this.items = response.records;
            });
        }
    }
</script>